
import os
import configparser


class confU:
    config = None
    def __init__(self):
        cfgdir = os.path.split(os.path.realpath(__file__))[0]
        paths = cfgdir.split("/")
        a = len(paths)-2
        separator = '/'
        arr = paths[1:a]
        b = '/'+separator.join(arr)+'/'
        confU.config = configparser.ConfigParser()
        confU.config.read(b+'/config.cfg', encoding='utf8')


if __name__ == "__main__":
    print(confU().config.get('encrypt','SECRET_KEY'))